package com.minivision.fdiot.rest.param.detect;

import javax.validation.constraints.Max;

import org.hibernate.validator.constraints.NotBlank;
import org.springframework.web.multipart.MultipartFile;

import com.minivision.fdiot.common.AuthParam;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class SearchParam extends AuthParam {

  private static final long serialVersionUID = 4331892568980284171L;

  @ApiModelProperty(value = "人脸Token")
  private String faceToken;
  @ApiModelProperty(value = "人脸照片链接")
  private String imageUrl;
  @ApiModelProperty(value = "人脸特征值")
  private String faceFeature;
  @ApiModelProperty(value = "人脸照片文件")
  private MultipartFile imageFile;

  @NotBlank(message = "facesetToken must not be empty")
  @ApiModelProperty(value = "人脸库Token", required = true)
  private String facesetToken;

  @Max(100)
  @ApiModelProperty(value = "返回相似人脸数量，默认为1，最多100个")
  private int resultCount = 1;

  @Override
  public String toString() {
    return "SearchParam [faceToken=" + faceToken + ", imageUrl=" + imageUrl + ", faceFeature=" + faceFeature
        + ", imageFile=" + imageFile.getOriginalFilename() + ", facesetToken=" + facesetToken + ", resultCount=" + resultCount + "]";
  }

}
